package com.example.concurrent.chapter14;

/**
 * @author Liuqz
 * @date 2018/11/25 20:58
 */
public class lazyEnumSingleton {

    private byte[] data = new byte[1024];

    private lazyEnumSingleton() {

    }

    private enum EnumHolder{
        INSTANCE;
        private lazyEnumSingleton instance;

        EnumHolder() {
            this.instance = new lazyEnumSingleton();
        }

        private lazyEnumSingleton getlazyEnumSingleton() {
            return instance;
        }
    }

    public static lazyEnumSingleton getInstacne() {
        return EnumHolder.INSTANCE.getlazyEnumSingleton();
    }
}
